<br /><br />
 <form method="post">
     <?php foreach($this->data as $data):?>
     <div class="form-group">
        <label for="name">Category Name:</label><br>
        <select name="categoryname">
            
            <?php foreach($this->form as $form):?>
            
            <option value="<?php echo $form['cat_id'];?>"<?php if($data['category_id']==$form['cat_id']) echo "selected";?> ><?php echo $form['name'];?></option>
            <?php endforeach;?>
        </select>
        
    </div>
    <div class="form-group">
        <label for="name">Section Name:</label><br>
        <input type="text" name="name" value="<?php echo $data['sec_name'];?>" required>
    </div>
     <div class="form-group">
         <label for="description">Description:</label><br>
         <textarea name="description" required style="width:400px;height:100px">
             <?php echo $data['description'];?>
         </textarea>
    </div>
     <input type="submit" class="btn btn-primary" value="Add Section">
     <?php endforeach;?>
</form>
